package d2_reflect;

public class Star {
    //给几个变量
    private String name;
    private char sex;
    private double height;
    private double weight;
    private String color;

    public Star() {
    }

    public Star(String name, char sex, double height, double weight, String color) {
        this.name = name;
        this.sex = sex;
        this.height = height;
        this.weight = weight;
        this.color = color;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public char getSex() {
        return sex;
    }

    public void setSex(char sex) {
        this.sex = sex;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    @Override
    public String toString() {
        return "Star{" +
                "name='" + name + '\'' +
                ", sex=" + sex +
                ", height=" + height +
                ", weight=" + weight +
                ", color='" + color + '\'' +
                '}';
    }
}
